﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace _3d_motion_v0._0
{
    public delegate void GenerelizedFunction();

    public partial class Integration : Form
    {
        private GenerelizedFunction _StartStopIntegration;
        private bool _inProcess;

        public Integration(GenerelizedFunction startStopFunc)
        {
            InitializeComponent();
            _StartStopIntegration = startStopFunc;
            _inProcess = false;
            bttn_StartInegr.Text = "Start";
        }

        private void bttn_StartInegr_Click(object sender, EventArgs e)
        {
            if (_inProcess = !_inProcess)
                bttn_StartInegr.Text = "Stop";
            else
                bttn_StartInegr.Text = "Start";
            _StartStopIntegration();
            
        }
    }
}
